/**
 * @file func_dynamic_menu.h
 * @author taylor peng
 * @brief 
 * @version 0.1
 * @date 2021-12-24
 * 
 * @copyright Copyright (c) 2021
 * 
 */
#ifndef _FUNC_DYNAMIC_MENU_
#define _FUNC_DYNAMIC_MENU_

#include <stdint.h>
#include <string.h>
#include <stdbool.h>

#define MENU_TIMEOUT_DELAY        10000
#define MENU_JOIN_NET_WAIT        200000
#define MENU_ADD_FACE_WAIT        30000

#define MENU_LIST_NONE             0XFF  //无效输入或无输入
#define MENU_LIST_ERROR            0XFE  //错误输入数字
#define MENU_LIST_OUT              0XFD  //一级菜单，退出主菜单
#define MENU_LIST_REFLASH          0XFC  //刷新菜单

#define MENU_OPERA_FINGER            0X01
#define MENU_OPERA_PASSWORD          0X02
#define MENU_OPERA_CARD              0X04
#define MENU_OPERA_FACE              0X08

#define MENU_STATUS_BACK                 1
#define MENU_STATUS_OPERA_SUCESS         2
#define MENU_STATUS_OPERA_FAILED         3
#define MENU_STATUS_USER_EXITST          4
#define MENU_STATUS_USER_FULL            5
#define MENU_STATUS_PASSWORD_EASY        6
#define MENU_STATUS_PASSWORD_CLEAR       7
#define MENU_STATUS_FINGER_TIMEOUT       8
#define MENU_STATUS_FACE_TIMEOUT         9

#define MENU_FIRST_DISP_LIST             7
#define MENU_DELETE_USERS_DISP_LIST      3
#define MENU_SYSTEM_SETTING_DISP_LIST    4
#define MENU_INSTALL_PARAM_DISP_LIST     5
#define MENU_NET_CONFIG_DISP_LIST        2
#define MENU_ADD_USER_LIST               2
#define MENU_DELETE_USER_LIST            2

#define TIME_KEY_LENGTH                  12

#define MENU_OLED_WAIT_TIME             1500

#ifdef  LED_SELECT_1_2
#define MENU_PAGE_UP                    '1'
#define MENU_PAGE_DOWN                  '2'
#else
#define MENU_PAGE_UP                    '2'
#define MENU_PAGE_DOWN                  '8'
#endif


uint8_t Func_Menu(uint8_t *reflashflg);

#endif
